package com.lenovo.study.service;

import redis.clients.jedis.BinaryClient;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * Author: fuxh3@lenovo.com
 * Date: Created in 2017/9/5 0005
 */
public interface RedisService {
     Boolean set(String key,String value);
     String get(String key);
     Long del(String ... keys);
     Long append(String key,String str);
     Boolean exists(String key);
     Long setnx(String key,String value);
     String setex(String key,String value,int seconds);
     Long setrange(String key,String str,int offset);
     List<String> mget(String...keys);
     String mset(String...keys);
     Long msetnx(String...keysvalues);
     String getset(String key,String value);
     String getrange(String key,int startOffset,int endOffset);
     Long incr(String key);
     Long incrBy(String key,Long integer);
     Long decr(String key);
     Long decrBy(String key,Long integer);
     Long strlen(String key);
     Long hset(String key,String field,String value);
     Long hsetnx(String key,String field,String value);
     String hmset(String key,Map<String,String> hash);
     String hget(String key,String field);
     List<String> hmget(String key,String...fields);
     Long hincrby(String key,String field,Long value);
     Boolean hexists(String key,String field);
     Long hlen(String key);
     Long hdel(String key,String...fields);
     Set<String> hkeys(String key);
     List<String> hvals(String key);
     Map<String,String> hgetall(String key);
     Long lpush(String key,String...strings);
     Long rpush(String key,String...strings);
     Long linsert(String key,BinaryClient.LIST_POSITION  where,String pivot,String value);
     String lset(String key,Long index,String value);
     Long lrem(String key,long count,String value);
     String ltrim(String key,long start,long end);
     String lpop(String key);
     String rpop(String key);
     String rpoplpush(String srckey,String destkey);
     String lindex(String key,long index);
     Long llen(String key);
     List<String> lrange(String key,long start,long end);
     Long sadd(String key,String ...members);
     Long srem(String key,String ...members);
     String spop(String key);
     Set<String> sdiff(String...keys);
     Long sdiffstore(String destKey,String...keys);
     Set<String> sinter(String...keys);
     Long sinterstore(String destKey,String...keys);
     Set<String> sunion(String...keys);
     Long sunionstore(String destKey,String...keys);
     Long smove(String srcKey,String destKey,String member);
     Long scard(String key);
     Boolean sismember(String key,String member);
     String srandmember(String key);
     Set<String> smembers(String key);
     Long zadd(String key,Map<String,Double> scoreMembers);
     Long zadd(String key,double score,String member);
     Long zrem(String key,String...members);
     Double zincrby(String key,double score,String member);
     Long zrank(String key,String member);
     Long zrevrank(String key,String member);
     Set<String> zrevrange(String key,long start,long end);
     Set<String> zrangeByScore(String key,String max,String min);
     Set<String> zrangeByScore(String key,double max,double min);
     Long zcount(String key,String min,String max);
     Long zcard(String key);
     Double zscore(String key,String member);
     Long zremrangeByRank(String key, long start,long end);
     Long zremrangeByScore(String key,double start,double end);
     Set<String> keys(String pattern);
     String type(String key);

}
